#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e5 + 5;

int n, m;
int a[N], b[N];
struct Node {
  int val;
  int id1, id2;
  bool operator<(Node o) const { return val > o.val; }
};
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  rep(i, 1, n) cin >> a[i];
  rep(i, 1, n) cin >> b[i];
  m = n;
  priority_queue<Node> pq;
  rep(i, 1, n) pq.push(Node{a[i] + b[1], i, 1});
  while (m--) {
    Node now = pq.top();
    pq.pop();
    cout << now.val << ' ';
    pq.push(Node{a[now.id1] + b[now.id2 + 1], now.id1, now.id2 + 1});
  }
  return 0;
}